home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
geos
/
geos67.d64
/
btx cONVERTER
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-08-15
|
4KB
|
179 lines
0 REM GEOWRITE TEXTKONVERTER
10 DIM Z$(255),K(23)
15 GOSUB655
20 GOSUB610
25 PRINT" 1 = GEOS-TEXT ERZEUGEN":PRINT
30 PRINT" 2 = TABELLE AENDERN":PRINT
35 PRINT" 3 = TABELLE LADEN":PRINT
40 PRINT" 4 = TABELLE SPEICHERN":PRINT
41 PRINT" 5 = GEOS 64 AUFRUFEN":PRINT
42 PRINT" 6 = GEOS 128 AUFRUFEN":PRINT
43 PRINT" AUF DER DISK MUSS SICH EIN LEERES FILE MIT DEM NAMEN DUMMY BEFINDEN !":PRINT
45 PRINT:PRINT"BITTE WAEHLEN !"
50 GETW$:W=VAL(W$):IFW<1ORW>6THEN50
55 GOSUB610
60 OPEN1,8,15,"I:0":GOSUB635
65 ON W GOSUB85,465,520,565,1000,1100
70 CLOSE1
75 GOTO20
80 :
85 PRINT" BITTE GEBEN SIE DEN NAMEN DES ZU "
90 PRINT" KONVERTIERENDEN TEXTES EIN!"
95 PRINT:INPUTAT$
100 GOSUB610
105 PRINT" WIEVIELE ZEICHEN PRO SEITE (1-4580) ":PRINT
110 INPUTAZ
115 IFAZ<1ORAZ>4580THEN100
120 :
125 REM
130 OPEN2,8,2,AT$+",R":GOSUB635
135 M$="TEXT-DUMMY"
140 PRINT#1,"S:";M$+"*"
145 OPEN3,8,3,M$+STR$(SZ+1)+",S,W":GOSUB635
150 :
155 REM
160 FORI=0TO23
165 PRINT#3,CHR$(K(I));
170 NEXTI
175 :
180 REM
185 P=0
190 GET#2,T$:IFT$=""THENT$=CHR$(0)
195 S=ST AND 64:T=ASC(T$)
200 IFT<161ORT>170THEN255
205 T1=T:T=69
210 IFT1=161THENT1=79:GOTO250
215 IFT1=165THENT1=65:GOTO250
220 IFT1=166THENT1=85:GOTO250
230 IFT1=168THENT1=207:GOTO250
235 IFT1=169THENT1=193:GOTO250
240 IFT1=170THENT1=170:GOTO250
245 IFT1=167THENT1=83:T=T1
250 PRINT#3,Z$(T1);
255 PRINT#3,Z$(T);
260 IFSTHEN270
265 P=P+1:IFP<AZTHEN190
270 PRINT#3,CHR$(0)
275 CLOSE3
280 X$=M$+STR$(SZ+1):GOSUB365
285 E$=C$:F$=D$
290 X$="DUMMY":GOSUB365
295 OPEN5,8,5,"#":GOSUB635
300 PRINT#1,"U1";5;0;ASC(C$);ASC(D$)
305 PRINT#1,"B-P";5;SZ*2+2
310 PRINT#5,E$;F$;
315 PRINT#1,"U2";5;0;ASC(C$);ASC(D$)
320 CLOSE5
325 SZ=SZ+1
330 GOSUB610
335 PRINT "ANZAHL SEITEN: ";SZ
340 IFSZ=63ANDS=0THENPRINT:PRINT" TEXT ZU LANG !":GOTO350
345 IFS=0THEN145
350 PRINT#1,"S:";M$;"*"
355 CLOSE2:RETURN
360 :
365 REM
370 OPEN4,8,4,"#":GOSUB635
375 A$=CHR$(18):B$=CHR$(1)
380 A=ASC(A$):B=ASC(B$)
385 PRINT#1,"U1";4;0;A;B
390 GET#4,A$,B$
395 FORI=0TO7
400 K=0
405 PRINT#1,"B-P";4;I*32+3
410 GET#4,C$,D$
415 IFD$=""THEND$=CHR$(0)
420 FORJ=1TOLEN(X$)
425 GET#4,W$
430 IFW$=MID$(X$,J,1)THENK=K+1
435 NEXTJ
440 IFK=LEN(X$)THEN450
445 NEXTI:GOSUB635:GOTO380
450 CLOSE4
455 RETURN
460 :
465 REM
470 INPUT" QUELLCODE-NUMMER ";Q
475 IFQ<0ORQ>255THEN470
480 PRINT:PRINT" ZUGEORDNETER GEOS-CODE:";ASC(Z$(Q))
485 NC=ASC(Z$(Q))
490 PRINT:PRINT" NEUES GEOS-CODE:":PRINT
495 INPUT" (RETURN=UEBERNEHMEN, 0=ENDE)";NC
500 IFNC<1ORNC>255THEN510
505 Z$(Q)=CHR$(NC):GOSUB610:GOTO465
510 RETURN
515 :
520 REM
525 INPUT"NAME DERTABELLE";NT$
530 OPEN2,8,2,NT$+",S,R":GOSUB635
535 FORI=0TO255
540 GET#2,Z$(I)
545 NEXTI
550 CLOSE2
555 RETURN
560 :
565 REM
570 INPUT"NAMEN FUER DIE NEUE TABELLE";NT$
575 OPEN2,8,2,NT$+",S,W":GOSUB635
580 FORI=0TO255
585 PRINT#2,Z$(I);
590 NEXTI
595 CLOSE2
600 RETURN
605 :
610 PRINTCHR$(147)
615 PRINTTAB(9);"*** TEXT-KONVERTER ***"
620 PRINT:PRINT
625 RETURN
630 :
635 INPUT#1,F,FT$,FT,FS
640 IFF<>0THENPRINT:PRINT" ";FT$:STOP
645 RETURN
650 :
655 RESTORE
660 FORI=0TO255
665 READZ:Z$(I)=CHR$(Z)
670 NEXTI
675 READZ:IFZ=-1THEN685
680 PRINT:PRINT "FEHLER IN DATAS":STOP
685 FORJ=OTO23
690 READK(J)
695 NEXTJ
700 RETURN
710 REM DEKODIERTABELLE
715 DATA32,32,32,32,32,32,32,32,32,32
720 DATA32,32,32,13,32,32,32,32,32,32
725 DATA32,32,32,32,32,32,32,32,32,32
730 DATA32,32,32,33,34,35,36,37,38,39
735 DATA40,41,42,43,44,45,46,47,48,49
740 DATA50,51,52,53,54,55,56,57,58,59
745 DATA60,61,62,63,64,97,98,99,100,101
750 DATA102,103,104,105,106,107,108,109,110,111
755 DATA112,113,114,115,116,117,118,119,120,121
760 DATA122,91,92,93,94,13,96,65,66,67
765 DATA68,69,70,71,72,73,74,75,76,77
770 DATA78,79,80,81,82,83,84,85,86,87
775 DATA88,89,90,123,124,125,126,127,32,32
780 DATA32,32,32,32,32,32,32,32,32,32
785 DATA32,32,32,32,32,32,32,32,32,32
790 DATA32,32,32,32,32,32,32,32,32,32
795 DATA32,32,32,32,32,32,32,32,32,32
800 DATA32,32,32,32,32,32,32,32,32,32
805 DATA32,32,32,32,32, 32, 32,123,124,125
810 DATA126,32,32,65,66,67,68,69,70,71
815 DATA72,73,74,75,76,77,78,79,80,81
820 DATA82,83,84,85,86,87,88,89,90,123
825 DATA124,125,126,127,32,32,32,32,32,32
830 DATA32,32,32,32,32,32,32,32,32,32
835 DATA32,32,32,32,32,32,32,32,32,32
840 DATA32,91,92,93,126,32,-1
845 :
850 REM
855 DATA24,0,48,1,64,0,144,0,224,0
860 DATA48,1,48,1,48,1,48,1,48,1
865 DATA23,9,0,0
1000 LOAD"RBOOT",8,1
1010 LOAD"RBOOT",9,1
1100 BOOT"128 RBOOT",U8
1110 BOOT"128 RBOOT",U9